$(function(){
	initMenu();
	$(".easyui-datebox").datebox("setValue",formatterDate(new Date()));
	$("#ppsellOrder").pagination({
				height : 30,
				layout : [ 'sep' ],
				buttons : [ {
					iconCls : 'icon-my-first',
					handler : function() {
						alert("第一页");
					}
				},{
					iconCls : 'icon-my-prev',
					handler : function() {
					}
				},{
					iconCls : 'icon-my-next',
					handler : function() {
						closeDisabled();
					}
				},{
					iconCls : 'icon-my-last',
					handler : function() {
					}
				},{
					iconCls : 'icon-my-add',
					text : "新增",
					handler : function() {
						var tab=parent.$("#window-tabs").tabs("getSelected");
						changeTabStatus(tab,'新增');
						closeDisabled();
					}
				}, {
					iconCls : 'icon-my-update',
					text : "修改",
					handler : function() {
						alert("修改");
					}
				}, {
					iconCls : 'icon-my-delete',
					text : "删除",
					handler : function() {
						alert("删除");
					}
				}, {
					iconCls : 'icon-my-audit',
					text : "审核",
					handler : function() {
						alert("审核");
						$("#shenhe").hide();
					}
				} ]
			});
	$("form").find(".isdisabled").textbox();//先把从始至终为disabled 的控件初始化
	$("form").find(".isdisabled").textbox("disable");//再把他们设为disabled
	openDisabled();
	$("#cdgv").datagrid({
		 url:'datagrid_data.json',   
		 height:135,
		 columns:[[   
		        {field:'code',title:'(栏号)',width:100},   
		        {field:'name',title:'物料编号',width:100},   
		        {field:'price',title:'(物料名称)',width:100}, 
		        {field:'code',title:'(规格型号)',width:100},   
		        {field:'name',title:'(单位名称)',width:100},   
		        {field:'price',title:'数量',width:100}, 
		        {field:'code',title:'(折扣前单价)',width:100},   
		        {field:'name',title:'折扣(%)',width:100},   
		        {field:'price',title:'单价',width:100}, 
		        
		        {field:'code',title:'金额',width:100},   
		        {field:'name',title:'税率(%)',width:100},   
		        {field:'price',title:'(税额)',width:100}, 
		        {field:'code',title:'(含税金额)',width:100},   
		        {field:'name',title:'预出库日',width:100},   
		        {field:'price',title:'(未出数量)',width:100}, 
		        
		        {field:'code',title:'赠品',width:100},   
		        {field:'name',title:'分录备注)',width:100},   
		        {field:'price',title:'(物料组合)',width:100}, 
		        {field:'code',title:'(来源单别)',width:100},   
		        {field:'name',title:'来源单号',width:100},   
		        {field:'price',title:'生产',width:100}, 
		        
		        {field:'code',title:'(排程单号)',width:100},   
		        {field:'name',title:'(已生产数量)',width:100},   
		    ]] 
	})
})